<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>animation-direction: normal | reverse | alternate | alternate-reverse</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
      width: 100vw;
      height: 100vh;
      background: #34495e;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    ul {
      width: 400px;
      height: 200px;
      display: flex;
    }
    li {
      flex: 1;
      list-style: none;
      color:tomato;
      font-size: 2em;
      position: relative;
      text-align: cemter;
    }
    span {
      position: absolute;
      animation-name: ani;
      animation-duration: 1s;
      animation-iteration-count: infinite;
    }
    @keyframes ani {
      to {
        transform: scale(3);
      }
    }
    li:nth-child(1)>span {
      animation-direction: normal;
    }
    li:nth-child(2)>span {
      animation-direction: reverse;
    }
    li:nth-child(3)>span {
      animation-direction: alternate; /* 轮流 */
    }
    li:nth-child(4)>span {
      animation-direction: alternate-reverse;
    }
  </style>
</head>
<body>
  <div class="heart"></div>
  <ul>
    <li><span>1</span></li>
    <li><span>2</span></li>
    <li><span>3</span></li>
    <li><span>4</span></li>
  </ul>
</body>
</html>